import {createBrowserRouter} from 'react-router-dom'
import Home from '../views/Home/index'
import Login from '../views/Login/index'
import { lazy } from 'react'
const Index=lazy(()=>import('../views/Index/index'))
const Order=lazy(()=>import('../views/Order/index'))
export const routerHome=[
    {
     path:'/home/index',
     element:<Index></Index>,
     title:'主页'
    },
    {
        path:'/home/order',
        element:<Order></Order>,
        title:'用户页面'
       },
]
const router=createBrowserRouter([
    {
        path:'/home',
        element:<Home></Home>,
        children:routerHome
    },
    {
        path:'/login',
        element:<Login></Login>
    },
])
export default router